import 'package:flutter_study/review/reudx2/book_reducer.dart';
import 'package:flutter_study/review/reudx2/user_reducer.dart';
import 'package:redux/redux.dart';

import 'user.dart';
import 'book.dart';

class ReduxState {
  User user;
  Book book;

  ReduxState({this.user, this.book});
}

ReduxState getRedux(ReduxState state, action) {
  return ReduxState(
      user: UserReducer(state.user, action),
      book: BookReducer(state.book, action));
}

// 中间件数组
final List<Middleware<ReduxState>> middleware = [UserInfoMiddleware1()];
